'use strict'

const Controller = require('egg').Controller;

class MessageController extends Controller {

	async list (){
		const ctx = this.ctx;

		let param = Object.assign({}, {
			pageSize: 15,
			pageNum: 1
		}, ctx.request.body);

		let list = await ctx.service.message.list(param);

		ctx.body = {
			code: 'SUCCESS',
			data: list
		}
	}
}

module.exports = MessageController;